<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<form id="pagerForm" method="get" model="viewRequest" action="#rel#">
	<input type="hidden" name="viewRequest.page" value="${page.number}" />
	<input type="hidden" name="viewRequest.size" value="${page.size}" />
	<c:forEach items="${viewRequest.params}" var="params">
		<input type="hidden"  name="viewRequest.params['${params.key}']" value="${params.value}" />
	</c:forEach>
	<c:forEach items="${viewRequest.sort}" var="sort">
		<input type="hidden" name="viewRequest.sort['${sort.key}']" value="${sort.value}" />
	</c:forEach>
</form>

	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${rootUrl}/member/dealer-level" method="get">
	</form>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${rootUrl}/member/dealer-level/new" target="dialog" width="860" height="460" title="添加"><span>添加</span></a></li>
		</ul>
	</div>
	<table class="table" targetType="dialog"  width="100%" layoutH="75">
		<thead>
			<tr>
				<th width="30" align="center" >序号</th>
				<th width="120">等级名称</th>
				<th width="200">等级高低</th>
				<th width="100">分佣等级(%)</th>
				<th width="100">加盟积分</th>
				<th width="100">加盟费用(元)</th>
				<th width="100">类型</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.content}" var="dealerLevel" varStatus="status">
			<tr>
				<td>${status.count}</td>
 				<td>${dealerLevel.name}</td>
				<td>${dealerLevel.level}</td>
				<td>${dealerLevel.percent}(%)</td>
				<td>${dealerLevel.joinPoint}</td>
				
				<td class="listMoneyField"><fmt:formatNumber value="${dealerLevel.joinMoney/100}" pattern="0.00"/></td>
				<td>
				<c:if test="${dealerLevel.type == 0}">基础会员</c:if>
				<c:if test="${dealerLevel.type == 1}">分销商</c:if>
				<c:if test="${dealerLevel.type == 2}">代理</c:if>
				</td>
				<td>
				    <a title="查看" target="dialog" width="860" height="460" href="${rootUrl}/member/dealer-level/${dealerLevel.id}" class="btnView">查看</a>
				    <a title="编辑" target="dialog" width="860" height="460" href="${rootUrl}/member/dealer-level/${dealerLevel.id}/edit" class="btnEdit">编辑</a>
					<a title="确定要删除这个记录吗?" callback="navTabAjaxDone" target="dialogAjaxTodo"  href="${rootUrl}/member/dealer-level/${dealerLevel.id}?_method=delete" class="btnDel">删除</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="${page.size}">${page.size}</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${page.totalElements}条 </span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${page.totalElements}" numPerPage="${page.size}" pageNumShown="10" currentPage="${page.number}"></div>
	</div>
</div>
